import { UPDATEPAGEJOBVIEW } from '../types/pagejobview'
import { handleActions } from 'redux-actions'

const Schema = {
  showEmpty: false,
  requestOverFirst: false,
  networkerror: false,
  barlevecurrent: 0, // 岗位人才current
  peopleDataSource: [{}, {}, {}, {}, {}], // 人才列表
  dataSource: [], // 岗位列表
  submitdata: {
    // 岗位请求的params
    page: 1,
    pageSize: 20,
    postSearchCondition: {
      anyWhere: 0,
      area: [],
      category: [],
      education: 0,
      settlementMethod: [],
      type: []
    }
  },
  submitdataperson: {
    page: 1,
    pageSize: 10,
    education: 0,
    category: [],
    type: [],
    area: []
  },
  homePageBanner: [],
  requestOverTop: true
}

export default handleActions(
  {
    [UPDATEPAGEJOBVIEW] (state, action) {
      return {
        ...state,
        ...action.payload
      }
    }
  },
  Schema
)
